import java.util.Scanner;


public class ZengShan {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
	    int [] shu = {66,22,88,11,99,0,0};
	    
		// 增加
	 /*     boolean  flag = false;
	      do{  
	    	    	  int xia  = -1;
	     System.out.print("\n请输入要增加的值");
	     int zeng = input.nextInt();
	     for(int i=0;i<shu.length;i++){
	    	 if(shu[i]==0){
	    		 xia = i;
	    		 break;
	    	 }
	     }
	      if(xia !=-1){
	    	  shu[xia] = zeng;
	    	  for(int xin :shu){
	    		  System.out.print(xin+"\t");
	    	  }
	    	  flag = true;
	    	  
	      }else{
	    	  System.out.println("数组已满");
	    	  break;
	      }
	
	     }while(flag);*/
	   
	     // 删除   
/*	       boolean  flag = false;
	    do{ 
	    	int xia1 = -1;
	      System.out.println("请输入要删除的数");
	      int sha = input.nextInt();
	      for(int i=0;i<shu.length;i++){
	    	  if(shu[i]==sha){
	    		  xia1 = i;
	    		  break;
	    	  }
	      }
	       if(xia1 != -1){
	    	   for(int i=xia1;i<shu.length-1;i++){
	    		  shu[i]  = shu[i+1];
	    	   }
	    	   shu[shu.length-1]  = 0;
	  
	    	   for(int xin :shu){
	    		   System.out.print(xin+"\t");
	    	   }
	    	   break;
	       }else{
	    	   System.out.println("没有找到要删除的数");
	    	   flag = true;
	       }
	    }while(flag);
	*/
	    
	     // 修改    
	/*       boolean flag = false;
	      do{
	    	  int xia2 = -1;
	   	       System.out.println("请输入你要修改的数");
	       int shr = input.nextInt();
	       for(int i=0;i<shu.length;i++){
	    	   if(shu[i]==shr){
	    		   xia2=i;
	    		   break;
	    	   }
	       }
	    if(xia2 != -1){
	    	System.out.println("输入修改的值");
	    	int xi = input.nextInt();
	    	shu[xia2] = xi;
	    	for(int xin :shu){
	    		System.out.print(xin+"\t");
	    	}
	    	break;
	    }else{
	    	System.out.println("没有修改的值");
	    	flag = true;
	    	
	    }
	      }while(flag);
	 */
	     // 查找   
	     boolean flag = false;  
	     do{
	      int xia3 = -1;
	      System.out.println("请输入你要查找得数：");
	      int cha = input.nextInt();
	      for(int i=0;i<shu.length;i++){
	    	  if(shu[i]==cha){
	    		  xia3=i;
	    		  break;
	    	  }
	      }
	      if( xia3 != -1){
	    	  System.out.println("恭喜你查到了，下标是"+xia3);
	    	  break;
	      }else{
	    	  System.out.println("没有这个数");
	    	  flag = true;
	      }
	     }while(flag);
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	}

}
